package com.scau.exception;

import com.scau.handleException.ResultCode;

/**
 * Siaoja
 */
public class MyException extends Exception {
    /**
     * 结果码
     */
    private String status;

    /**
     * 结果码描述
     */
    private String msg;

    /**
     * 结果码枚举
     */
    private ResultCode resultCode;

    public MyException(ResultCode resultCode){
        super(resultCode.getMsg());
        this.status = resultCode.getStatus();
        this.msg = resultCode.getMsg();
        this.resultCode = resultCode;
    }

    public String getCode() {
        return status;
    }

    public void setCode(String status) {
        this.status = status;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public ResultCode getResultCode() {
        return resultCode;
    }

    public void setResultCode(ResultCode resultCode) {
        this.resultCode = resultCode;
    }
}
